package org.jeecg.modules.demo.baseorderproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.baseorderproject.entity.BaseOrderProject;
import org.jeecg.modules.demo.baseorderproject.entity.BaseOrderProjectMain;
import org.jeecg.modules.demo.baseorderproject.entity.BaseOrderProjectWriteoff;

import java.util.List;

/**
 * @Description: 订单项目表
 * @Author: jeecg-boot
 * @Date: 2022-02-11
 * @Version: V1.0
 */
public interface BaseOrderProjectMapper extends BaseMapper<BaseOrderProject> {
    /**
     * 查询订单核销项目列表
     *
     * @param storeId
     * @param orderCode
     * @param memberName
     * @param memberPhone
     * @param beginTime
     * @param endTime
     * @return
     */
    IPage<BaseOrderProjectWriteoff> searchOrderProjectWriteoff(Page page, @Param("storeId") String storeId, @Param("orderCode") String orderCode,
                                                               @Param("memberName") String memberName, @Param("memberPhone") String memberPhone,
                                                               @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    /**
     * 查询会员可用项目列表
     *
     * @param storeId
     * @param memberId
     * @return
     */
    List<BaseOrderProjectMain> searchCanUseProjectList(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("storeId") String storeId, @Param("memberId") String memberId);

    /**
     * 查询会员已用完项目列表
     *
     * @param storeId
     * @param memberId
     * @return
     */
    List<BaseOrderProjectMain> searchHasUsedProjectList(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("storeId") String storeId, @Param("memberId") String memberId);

}
